DATAS SEGMENT  
    SUR DB 0,-1,07FH,07FH,07FH,07FH,07FH,07FH,07FH,07FH
    N EQU $-SUR
    POS DB ?
DATAS ENDS

CODES SEGMENT
    ASSUME CS:CODES,DS:DATAS
START:
	MOV AX,DATAS
    MOV DS,AX
  
    LEA SI,SUR
    MOV CX,N
LOP:
    MOV BL,[SI]
    CMP BL,080H
    JA EXIT
    CMP BL,000H
    JE EXIT
    INC POS
    
EXIT:
    INC SI
    LOOP LOP
    
    MOV AH,4CH   
    INT 21H
CODES ENDS
    END START